import React from "react"
import { Switch, Route, Redirect } from "react-router-dom"
import { Suspense } from "react"

export default function RouterView(props) {
    return (
        <div>
            <Suspense fallback="">
                <Switch>
                    {
                        props.routes.map(item => {
                            return (
                                <Route key={}></Route>
                            )
                        })
                    }
                    <Redirect exact from="/" to="/layout/home"></Redirect>
                    <Redirect exact from="/layout/home" to="/layout/home/tuijian"></Redirect>
                </Switch>
            </Suspense>
        </div>
    )
}
